home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / zxam16b.lha / ZXAM Spectrum / ZXAM_Spectrum.DOCeng < prev    next >
Text File  |  1995-01-27  |  58KB  |  1,350 lines

  1. ›[0m›[0 p
  2.                          ›[0;1;33;40mZXAM SPECTRUM EMULATOR v1.6b›[0m
  3.             © 1993-95 WareSoft All rights reserved
  4.               by Antonio J. Pomar Rosselló
  5.  
  6.  
  7.  
  8.  
  9. ›[0;1mDISTRIBUTION›[0m
  10.  
  11.    This  program  is SHAREWARE. This means that you can test the program during
  12. one  month.  After this period you must send $ US 15 (only CASH) to the author.
  13. In  return  you  will  receive  the latest version available (probably the 128k
  14. version  will  be  available  by  march  1995). By doing this contribution, you
  15. assure the further development of the emulator. Thanks in advance.
  16.  
  17.   This  SHAREWARE  version  can  be  freely  distributed  provided that all the
  18. associated  files  are distributed with the program itself. Neither the program
  19. nor  their  associated  files  must  be  modified  in  any  way.  The  complete
  20. distribution  package  can  be  compressed  with  LHA,  LHarc  or  similar  for
  21. distribution  convenience.  No  charge  must be made for use or distribution of
  22. this  package.  You  can  upload  this  package  to  any  BBS,  include it in a
  23. magazine's coverdisk or in a Public Domain library.
  24.  
  25.    The complete distribution package contains:
  26.  
  27.     ZXAM_SpectrumAGA       The full AGA emulator (with icon).
  28.     ZXAM_SpectrumAGA_FASTER       Faster version for AGA (with icon).
  29.     ZXAM_SpectrumOCS_ECS       OCS/ECS version of the emulator (with icon).
  30.     ZXAM_SpectrumOCS_ECS_FAST  Faster version for OCS/ECS (with icon).
  31.     ZXAM_Spectrum.DOCeng       This is the english DOC (with icon).
  32.     ZXAM_Spectrum.DOCesp       Spanish translation of the DOC (with icon).
  33.     README!!           Notes for distribution (with icon).
  34.     LEEME!!               The same, but in spanish (with icon).
  35.     INTERFACE.IFF           Diagram of tape interface (with icon).
  36.     DIGIT_INTERFACE.IFF       Digitalization of my interface (with icon).
  37.     powerpacker.library       To load compressed spectrum programs.
  38.  
  39.    This software is provided 'AS IS'  without  warranty  of  any  kind,  either
  40. expressed or implied. By using this package you agree to accept the entire risk
  41. as to the quality and performance of the program, or even of the DOC.  The same
  42. applies to the  tape interface.  It is prohibited to  build and  sell the  tape
  43. interface for profit. The interface must be build for personal use only.
  44.  
  45.    All trademarks and Copyrights of products mentioned    in  this  document  are
  46. acknowledged by the author.
  47.  
  48.    In the DOC of the  Spectrum Emulator 1.7 I have read that  AMSTRAD has given
  49. special permission for emulator authors to use the Spectrum's ROM code.  Anyway
  50. the Spectrum's ROM is copyright to AMSTRAD.
  51.  
  52.    The  iff  screen  'KeysHelp.iff'  has  been  included with permission of the
  53. author (Mikael Ostergren). Thanks Mikael :-)
  54.  
  55.    The powerpacker.library is © Nico François.
  56.  
  57.    The Sinclair ZX Spectrum Emulator is © Peter McGavin.
  58.  
  59.    The Sinclair ZX Spectrum Emulator "Z80" is © Gerton Lunter.
  60.  
  61.    The emulator ZX Spectrum (SPEC386) is © Pedro Gimeno.
  62.  
  63.  
  64.  
  65.  
  66. ›[0;1mREQUIREMENTS›[0m
  67.  
  68.    This program  needs WorkBench 3.0 (v39)  or higher to run,  the AGA    chipset
  69. and a  68020 CPU,  or better.  In short,  an Amiga 1200 or 4000.  It needs  the
  70. powerpacker.library too,  to load the compressed Spectrum programs, in LIBS: or
  71. in the same directory of the executable.
  72.  
  73.    For  the  filerequester  the  asl.library  is  used,  but this library has a
  74. problem.  Each  time the filerequester is opened, the whole directory has to be
  75. read.  This  can be very annoying when loading files from floppy disks, or when
  76. you  load  it  from  a harddisk directory with a lot of files (400 files, in my
  77. case). The best solution could be to use the reqtools.library filerequester, as
  78. this requester has a buffer that avoid the re-reading of the directory, but due
  79. to  serious  technical problems I couldn't do it yet. Meanwhile the best option
  80. is  to use the RTPatch program (by Nico François), that patches the asl/req/arp
  81. libraries to use the reqtools filerequester instead. This way the emulator, and
  82. other  programs that use asl/req/arp, will use the reqtools filerequester, that
  83. is much better than the original ones. Curiously with RTPatch 1.3 (the one that
  84. I  use)  the buffer works well, but with ReqChange 3.0 (another patch that does
  85. the same) the buffer doesn't work.
  86.  
  87.    But, ¿what's AGA in the emulator? Well, I use some special AGA capabilities,
  88. not  present  in  the  OCS/ECS  chipset,  to  convert the Spectrum's pixels and
  89. attributes to Amiga bitplanes.
  90.  
  91.    As you can see with the package there is an OCS/ECS version of the emulator.
  92. This  version  needs 68020+, WorkBench 2.04+ and any kind of chipset. This is a
  93. new  version,  and it hasn't been fully tested. Please, if you have any problem
  94. with this version, let me know (I can't test fully this version because I don't
  95. have  a  2.04/ECS  computer  with 68020+ processor). This version uses a slower
  96. system  for  screen  conversion  to  bitplanes  than  the  AGA version (this is
  97. noticeable  in  games  like  Uridium).  Anyway,  in most cases there will be no
  98. difference  between  OCS/ECS  and  AGA  systems. The only things missing in the
  99. OCS/ECS version is the possibility of monocrome/colour display and the FLASH of
  100. colors (that is emulated instead doing an INVERSE).
  101.  
  102.    Is VERY convenient  that you have 32 bits FAST memory.  With FAST memory the
  103. speed, and the sound, will be A LOT better.
  104.  
  105.  
  106.  
  107.  
  108. ›[0;1mINTRODUCTION›[0m
  109.  
  110.    Well, maybe you have guessed that this program is a Sinclair ZX Spectrum 48k
  111. emulator,  with all those lovely attributes and only one channel of 1 bit sound
  112. (sob...).
  113.  
  114.  
  115.  
  116.  
  117. ›[0;1mSPECTRUM PROGRAM FORMATS›[0m
  118.  
  119.    Before  you    can  understand  the function  of some of  the gadgets    of  the
  120. program,  you must  learn something  about the    format of the Spectrum programs
  121. (often called 'snapshots').
  122.  
  123.    On the disk, a Spectrum program is simply a file that contains a copy of the
  124. 48k of RAM  of the Spectrum,  along with all the registers  of the Z80 CPU (the
  125. CPU of the Spectrum).
  126.  
  127.    The    problem  is  that  every Spectrum  emulator  (on any computer)    uses  a
  128. different  format to  save the memory  and  the registers.  That  means that  a
  129. program saved with an emulator will not load into any other emulator.
  130.  
  131.    Instead of create my own format for the  Spectrum program I have  decided to
  132. support several formats of programs. You can decide what format you want to use
  133. for the programs, or use the emulator as a format conversor too.
  134.  
  135.    The four  formats that I know, and that I have included in the emulator, are
  136. called (provisionally) PC, MIRAGE, Z80 and KGB. These formats are:
  137.  
  138.      PC:  This is the format used by a nice  emulator for the IBM PC,  and
  139.      compatibles, programmed  in Spain by Pedro Gimeno.  The executable is
  140.      called  SPEC386.EXE  and  the  version  I    know  is the 0.99D ß. This
  141.      emulator needs  a 386DX at 25MHz,    with a 256k cache,  to approach to
  142.      the original Spectrum speed.  These files are  49190 bytes  long  and
  143.      have a .SP extension appended to the name.
  144.  
  145.      MIRAGE: This is the format used by the Spectrum Emulator 1.7 by Peter
  146.      McGavin.  These  files  are 49179 bytes  long and have  the .snapshot
  147.      extension appended  to the name.  I  recommend that  you  change  the
  148.      extension to .mirage,  because there are many Sepctrum emulators that
  149.      use  the  .snapshot  extension  and  this  can  cause confusion.  The
  150.      format  version  supported  by  the  ZXAM  emulator is  the  post-1.6
  151.      version,  that  stores correctly  the border colour. This is the same
  152.      format used by the emulators (for PC) VGASPEC (*.SNA)  and JPP (*.SP,
  153.      by Arnt Gulbrandsen).
  154.  
  155.      Z80: This format (implemented  since version 1.6)  is the one used by
  156.      the Spectrum emulator (for PC computers) called 'Z80'  by G.A.Lunter.
  157.      ZXAM  can load  the old  Z80 format  (version 1.45)  and the  new one
  158.      (version 2.01) if the snapshot is a 48k one. If the snapshot is 128k,
  159.      or needs  the  emulation  of Interface  I or  any other  hardware not
  160.      supported by ZXAM,  the snapshot  will not be loaded.  This format is
  161.      implemented for loading only.
  162.  
  163.      KGB: This format (implemented  since version 1.6b) is the one used by
  164.      the KGB Spectrum emulator for Amiga computers. These files are always
  165.      49486 bytes long. I don't know who is the author as I have never seen
  166.      any  DOC file  for this emultor.  Probably  is in  disuse due  to its
  167.      incompatibility with version 2.0 and higher of AmigaDOS.  This format
  168.      is available for loading only.
  169.  
  170.    In all the cases the snapshots can be crunched with powerpacker.
  171.  
  172.    Notice  that the emulator NEVER uses the filename extension for identify the
  173. format  of  the  file. Instead, a series of checkings in the file structure are
  174. done  for identifying it. You can use the extension you wish for the files, but
  175. if  you  don't include this extension in the pattern of filerequester (tooltype
  176. PATTERN in the emulator's icon) the files will not appear in it.
  177.    
  178.    There  is  another  format,  the  .TAP  one.  This is not a snapshot format.
  179. Instead,  it is a "tape" file that contents a series of headers an data blocks.
  180. There  is  an ARexx script with the emulator to "explode" these .TAP files into
  181. the  corresponding  .header  and .bytes files (a lá Spectrum 1.7). This way you
  182. can load these files through the "load -> from disk" option.
  183.  
  184.    If you know any other format (for any computer, like Amiga, Cray, MAC, Atari
  185. or PC) please send to me the information that you have,  along with a disk with
  186. several games saved in that format.  In the next version of the emulator I will
  187. support that format.
  188.  
  189.  
  190.  
  191.  
  192. ›[0;1mRUNNING THE EMULATOR›[0m
  193.  
  194.    You can  run the emulator from  WorkBench or SHELL.    If you run it  from the
  195. SHELL,    it will "detach" from  the SHELL window  and will search  the program's
  196. icon to read the ToolTypes.
  197.  
  198.    Any problem at startup will be reported by a requester.
  199.  
  200.    Available ToolTypes are:
  201.  
  202.     PATTERN=    Here you can put the pattern (or 'filter') for the
  203.             filerequester. Take a look at the user's manual of
  204.             your Amiga to learn how to use these patterns.
  205.  
  206.     LOADPATH=    The directory where the LOAD filerequester will be
  207.             opened.  This can be the directory  where you have
  208.             the  Spectrum games in the HD.
  209.  
  210.     SAVEPATH=    The directory where the SAVE filerequester will be
  211.             opened.
  212.  
  213.     DEFFORMAT=    The default format used to save  the programs (PC,
  214.             PC_PP,  MIRAGE  or  MIRAGE_PP).  Anyway,  you  can
  215.             change this with the suitable gadgets.
  216.  
  217.     REXXPATH=    The directory where you have the ARexx scripts for
  218.             the emulator. The scripts names must  end with the
  219.             '.zxam' extension.
  220.     
  221.     ROMFILE=    The external  ROM to  load over the  internal one.
  222.             The ROM can be compressed  with  powerpacker.  You
  223.             must be care about non-original ROMs,  as they can
  224.             produce incompatibility  with certain  games  (not
  225.             an emulator's fault ;-)
  226.  
  227.     PRERUN=        Sets a command  line to  be executed  by  AmigaDOS
  228.             right before  starting the emulation. For exmaple,
  229.             if "PRERUN=cpu nocache"  the caches of CPU will be
  230.             disabled.   Before  the  PRERUN  command  line  is
  231.             executed the  emulator will save the status of the
  232.             caches   for   restore   it  when  returning  from
  233.             emulation (with HELP key).  This way you can  have
  234.             the caches disabled in the  emulation but  without
  235.             having to disable de caches for the WorkBench too.
  236.             
  237.     POSTRUN=    This command line will  be  executed  right  after
  238.             returning from the emulation. The status of caches
  239.             is restored BEFORE the POSTRUN is executed.
  240.  
  241.     LOADMODE=    Sets the default mode  for the ROM's  LOAD routine
  242.                         (TAPE or DISK).
  243.  
  244.     SAVEMODE=    Sets the default mode for the  ROM's SAVE  routine
  245.                         (TAPE, DISK or  DISK_PP if you  want that the data
  246.                         is crunched before SAVEing to the disk).
  247.  
  248.  
  249.  
  250.  
  251. ›[0;1mPROGRAM'S WINDOW›[0m
  252.  
  253.    The window has  several gadgets to load, save, etc.. All the gadgets with an
  254. underlined letter means that pressing that letter on the keyboard is like click
  255. on the gadget.
  256.  
  257.    The gadgets are:
  258.  
  259.    Load  Program  .-  Opens the filerequester to choose the spectrum program
  260.      that you want to load.  The emulator will detect the format of the file
  261.      and then will load it in the Spectrum's memory. IMPORTANT: the programs
  262.      can be compressed with  PowerPacker.  That  means to save    lots of disk
  263.      space. If you load a file    that the program don't know,  the Spectrum's
  264.      memory  will be  trashed with  that file,    but this  is harmless.    This
  265.      version of the emulator  CAN  load programs from tape,  but you need to
  266.      build the  interface described  in INTERFACE.IFF. Since version 1.5 the
  267.      window of the emulator  is an AppWindow.  That means that  you can drop
  268.      icons  inside  the  window  and  it  will  be  loaded.  If  you  drop a
  269.      disk/drawer the filerequester will be opened in that disk/drawer.
  270.  
  271.    Reload.-  Reloads the  last loaded  program,  that appears in the 'loaded
  272.      file' box.
  273.  
  274.    Save program.- Saves the complete memory and registers of the Spectrum in
  275.      the format selected with the  "SAVE FORMAT" gadgets.  Actually they are
  276.      saved uncompressed.
  277.  
  278.    POKE.- Guess what...
  279.  
  280.    "SAVE FORMAT" box .- Inside this  box there are  4 gadgets to  select the
  281.      format you  want to use  to save the Spectrum programs. The formats are
  282.      PC and MIRAGE, and the compressed forms PC_PP and MIRAGE_PP.
  283.  
  284.    RUN .- Starts  the emulation.  During  the emulation  the  multi-task  is
  285.      stopped and the emulator takes TOTAL control over the machine.  You can
  286.      return to the WorkBench by pressing the HELP key.
  287.  
  288.    Reset & RUN.- Like RUN but forcing a RESET of the Spectrum.
  289.  
  290.    Run ARexx.- Opens a file requester to select the ARexx script to run.  It
  291.      will be opened  on the path  fixed by the  REXXPATH ToolType.  Only the
  292.      files with the '.zxam' extension will be showed.
  293.  
  294.    Abort ARexx.-  This gadget is under control of  the ARexx script.  Is the
  295.      script that must enable it and read it when needed. The emulator simply
  296.      says to the script if the gadget has been pressed.
  297.  
  298.  
  299.  
  300.  
  301. ›[0;1mMENUS & KEYBOARD›[0m
  302.  
  303.    All the gadgets with an underlined letter means that pressing that letter on
  304. the keyboard  is like click on the gadget.  The help key brings  the 'About...'
  305. requester. The ESC key quits the emulator. The TAB, an Shift+TAB, key activates
  306. and moves through the integer gadgets.
  307.  
  308.    In the menu you can find the 'About...' and 'Quit' items.
  309.  
  310.    Since the 1.6 version there is a new menu, called 'Options', that enables to
  311. control  the  LOAD/SAVE  modes (to DISK or TAPE).
  312.  
  313.  
  314.  
  315.  
  316. ›[0;1mTHE SPECTRUM'S KEYBOARD›[0m
  317.  
  318.    In the emulation the  keyboard is like the  one of the Spectrum,  with  some
  319. 'special' keys:
  320.  
  321.      <-   Deletes a char (Shift+0)
  322.      Ctrl Like pressing Caps+Symbol (E mode)
  323.      Alt  Like Symbol Shift
  324.      Del  Like Shift+1 (Edit)
  325.      Help Returns to WorkBench
  326.      Esc  RESET!!!
  327.      F1   Switches between colour/black&white modes. In CHIPMEM-only systems
  328.       the DMA load of the memory slows down the CPU. If you switch to the
  329.       black&white mode the DMA load is much smaller, thus the emulator
  330.       will run about 10% faster and the sound will be A LOT better.
  331.      F2   In black&white mode inverts the image.
  332.      F6   Starts the transfer (the Spectrum's memory will be saved to tape
  333.           ready to be loaded in a real Spectrum or in the emulator itself).
  334.      Cursor keys  Like the original cursor keys of Spectrum+ (Shift+5 6 7 8).
  335.      ,      (key on the right of M) is the ',' (Symbol+N)
  336.      .      (2ª on the right of M) is the '.'(Symbol+M)
  337.      ´      (3ª on the right of M) is the '"' (Symbol+P)
  338.      Ñ      (key on the right of L) is the ':' (Symbol+Z)
  339.      ;      (2ª key on the right of L) is the ';' (Symbol+O)
  340.  
  341.    (Symbols referent to the spanish Amiga 1200 keyboard)
  342.  
  343.    The keypad works complete.
  344.  
  345.    The Kempston joystick is emulated with the Amiga joystick.
  346.  
  347.    Maybe you will notice that you can't press simultaneously 2 keys in the same
  348. row of the keyboard.  This is because you have an Amiga 1200,  and its keyboard
  349. simply behaves in this very particular way.  You can test it with any  of those
  350. keyboard-playing Spectrum games (all the games!).
  351.  
  352.  
  353.  
  354.  
  355. ›[0;1mEMULATION›[0m
  356.  
  357. Details about the FULL version:
  358.  
  359.     - The original Spectrum ROM is inside the executable.
  360.     - The R register is fully emulated.
  361.     - In the F register the 2 unusued bits aren't emulated, and the
  362.       emulation of H and N is partial.
  363.     - The BCD is fully emulated.
  364.     - All the undocumented instructions of the Z80 CPU are emulated.
  365.     - Interrupt mode 0 is like interrupt mode 1 (RST $38).
  366.     - No NMI (for what?).
  367.     - The border is emulated on the copperlist. That means that you
  368.       can't do fancy border effects, but the BORDER command works.
  369.     - The transfer intructions are emulated at 32 bits level.
  370.     - You can run the emulator in colour or black&white mode, and
  371.       can switch the modes while running. This is mainly for computers
  372.       with only CHIP memory.
  373.     - FLASH fully emulated.
  374.     - Sound emulated at OUT instruction level.
  375.     - The kempston joystick is fully emulated at IN level.
  376.     - Only partial screen sincronization. Some games will 'blink',
  377.       for the moment.
  378.     - The Spectrum screen is PAL 15KHz. Sorry, but no VGA monitors.
  379.     - The screen is genlock compatible.
  380.     - The emulator works even if VBR is not 0.
  381.    >>>>>>>>> Addendum for version 1.3 ß <<<<<<<<
  382.     - Loads from tape, by means of a patch in the Spectrum's ROM.
  383.     - Saves to tape in REAL TIME, that means, is the Z80 emulation that
  384.       is sending the sound to the tape, even with an Amiga 1200 without
  385.       FAST and in colour mode (!!).
  386.     - The border is nearly perfect.
  387.    >>>>>>>>> Addendum for version 1.3b ß <<<<<<<<
  388.         - The emulator includes a transfer. With this you can pass programs
  389.           from disk to tape.
  390.    >>>>>>>>> Addendum for version 1.6 <<<<<<<<
  391.         - Now you can redirect the LOAD and SAVE routines of the Spectrum's
  392.           ROM to DISK or TAPE.
  393.       
  394.     Details about the FAST version (v1.3 ß):
  395.     - No BCD emulation. That means that the BASIC will print the numbers
  396.       with strange symbols, but the calculatios are still correct. Some
  397.       games don't print correctly the score.
  398.     - The internal timings are less accurate. Some programs may behave
  399.       in strange ways.
  400.     - No R register emulation.
  401.     - No SAVE to tape, and no stabilized sound.
  402.     - No LOAD from tape.
  403.     - The border is of slow type.
  404.     (really, the FAST version is only for PLAYING!!)
  405.     - The speed difference between the FAST and FULL versions is about
  406.       5% to 10% (depends on the program). Actually, I use the FULL version
  407.       with my Amiga 1200 because I prefer an emulation more accurate.
  408.     
  409.  
  410.  
  411.  
  412. ›[0;1mAREXX PORT›[0m
  413.  
  414.    Since version 1.4 ß the emulator has an ARexx port. This port is for writing
  415. scripts to support new file formats, assemble, disassemble, and any other thing
  416. you can think. The port has the name 'ZXAM_REXX', but you only need the name to
  417. test if the emulator is present. More on this below.
  418.  
  419.    With the emulator  you have  some  example  scripts  (example but useful,  I
  420. think).  There  is an example to load snapshots from ARexx, another to save the
  421. Spectrum's  screen  as  IFF,  for  batch converting of formats, for listing the
  422. BASIC  program  inside  the  Spectrum  memory,  for extracting the ROM from the
  423. emulator,  if  you  want  to  modify  it  for  any  reason, for disassemble the
  424. spectrum's  memory and for discompose the .TAP files. Some of these scripts are
  425. simply  examples  of  usage  of  the emulator's functions. A good sample of the
  426. possibilities of the ARexx port is the Monitor.zxam script (created by Leonardo
  427. Cocaña  Galán).  This  script  acts like a very simple disassembler, but can be
  428. greatly  enhanced  to be a full blown disassembler/monitor. Some of the scripts
  429. need  some  system  commands  (like requestchoice or multiview). If you doesn't
  430. have  these  commands  you must modify the scripts to use the commands that you
  431. have.
  432.  
  433.    The ARexx port of the emulator is an unusual one.  Intead of being a Command
  434. Host it is a Function Host.  That means that the parameters are fomatted inside
  435. parentheses, separated by commas.  Even if the function doesn't need parameters
  436. you must put and empty parentheses at the end.  The advantages are that you can
  437. use  the  functions  directly  inside  expressions,  and you  don't need  to do
  438. ADDRESS ZXAM_REXX or OPTIONS RESULTS  at the beginning  of the script.  All the
  439. functions begin with ZXAM to  avoid interference with function's names of other
  440. Function Hosts and libraries. The names are case insensitive.
  441.  
  442.    The 56 functions implemented in version 1.6b (39.21) are:
  443.    
  444.  
  445. ZXAMGetReg:  Gets the contents of a register, 8 or 16 bits. Look at 'Registers'
  446. section  for  more  details. The optional parameter 'format' sets the format of
  447. the  value  returned  ('h'  for  hexadecimal  and 'd' for decimal). The default
  448. format is decimal.
  449.  
  450. format:        value = ZXAMGetReg( register , [format] )
  451.             
  452. -------------------------------------------------------------------------------
  453.              
  454. ZXAMSetReg:  Puts  an  8  or  16 bits  value  inside  a Z80 register.   Look at
  455. 'Registers' section for more details.
  456.     
  457. format:        ZXAMSetReg( register , value )
  458.             
  459. -------------------------------------------------------------------------------            
  460.  
  461. ZXAMPeek: Reads a byte from the specified address.
  462.  
  463. format:        value = ZXAMPeek( address )
  464.  
  465. -------------------------------------------------------------------------------
  466.  
  467. ZXAMPoke: Writes a byte at the specified address.
  468.  
  469. format:        ZXAMPoke( address , byte )
  470.  
  471. -------------------------------------------------------------------------------
  472.  
  473. ZXAMDPeek: Reads a 16 bit value from the Spectrum's memory.  The value  is read
  474. with the z80 format, that is, less significant byte first.
  475.  
  476. format:        value = ZXAMDPeek( address )
  477.  
  478. -------------------------------------------------------------------------------
  479.  
  480. ZXAMDpoke:  Writes  a 16 bit value from the Spectrum's memory.  The   value  is
  481. written with the z80 format, that is, less significant byte first.
  482.  
  483. format:        ZXAMDPoke( address , value )
  484.  
  485. -------------------------------------------------------------------------------
  486.  
  487. ZXAMPutMem:  Puts  a  string in the memory.  Usually  the  string  is  a  block
  488. of bytes, or the entire spectrum's memory.
  489.  
  490. format:        ZXAMPutMem( address , string )
  491.  
  492. -------------------------------------------------------------------------------
  493.  
  494. ZXAMGetMem: Copies the contents of the specified block to the result string.
  495.  
  496. format:        string = ZXAMGetMem( address , size )
  497.  
  498. -------------------------------------------------------------------------------
  499.  
  500. ZXAMFindByte:  Searchs the specified byte,  starting from the address.  If  the
  501. top of  the spectrum's  memory is  reached without finding the byte,  a -1 will
  502. be returned. If the byte is found, the address of the byte is the result.
  503.  
  504. format:        address = ZXAMFindByte( address , byte_to_search )
  505.  
  506. -------------------------------------------------------------------------------
  507.  
  508. ZXAMRun: Starts the emulation.
  509.     
  510. format:        ZXAMRun()
  511.  
  512. -------------------------------------------------------------------------------
  513.  
  514. ZXAMQuit: Quits the emulator.
  515.  
  516. format:        ZXAMQuit()
  517.  
  518. -------------------------------------------------------------------------------
  519.     
  520. ZXAMppLoadFile:  Loads  a  file through  the powerpacker.library  and puts  the
  521. complete file in the result string.  If the file wasn't compressed,  it will be
  522. loaded anyway.
  523.  
  524. format:        string = ZXAMppLoadFile( path_&_name )
  525.  
  526. -------------------------------------------------------------------------------
  527.  
  528. ZXAMPPSaveFile:  Saves  a  block of  bytes  to  a  file,  compressing  it  with
  529. powerpacker.library.  If you  don't want  that the file be compressed,  use the
  530. ARexx own file commands.
  531.  
  532. format:        ZXAMppSaveFile( path_&_name , string )
  533.  
  534. -------------------------------------------------------------------------------
  535.  
  536. ZXAMLoadRequester: Opens the LOAD filerequester.  The title is  for the top bar
  537. of the requester.  The path for open the requester is optional.  If no path  is
  538. specified, the last path used with the requester will be used. If 'path_&_name'
  539. is empty means that the 'cancel' has been pressed.
  540.  
  541. format:        path_&_name = ZXAMLoadRequester( title , [path] )
  542.  
  543. -------------------------------------------------------------------------------
  544.  
  545. ZXAMSaveRequester: Opens the SAVE filerequester.  The title is  for the top bar
  546. of the requester.  The path for open the requester is optional.  If no path  is
  547. specified, the last path used with the requester will be used. If 'path_&_name'
  548. is empty means that the 'cancel' has been pressed.
  549.  
  550. format:        path_&_name = ZXAMSaveRequester( title , [path] )
  551.  
  552. -------------------------------------------------------------------------------
  553.  
  554. ZXAMNameFormat:  Puts the strings  'name' and 'format' in the 'Loaded file' and
  555. 'Format' boxes of the emulator's window.
  556.  
  557. format:        ZXAMNameFormat( name , format )
  558.  
  559. -------------------------------------------------------------------------------
  560.  
  561. ZXAMActName: Returns the contents of the 'Loaded file' box. If there is no name
  562. an empty string will be returned.
  563.  
  564. format:        name = ZXAMActName()
  565.  
  566. -------------------------------------------------------------------------------
  567.  
  568. ZXAMActLoadPath: Returns the last path used in the LOAD filerequester.
  569.  
  570. format:        path = ZXAMActLoadPath()
  571.  
  572. -------------------------------------------------------------------------------
  573.  
  574. ZXAMActSavePath: Returns the last path used in the SAVE filerequester.
  575.  
  576. format:        path = ZXAMActSavePath()
  577.  
  578. -------------------------------------------------------------------------------
  579.     
  580. ZXAMActFormat:  Returns the contents of the 'Format' box. If there is no format
  581. an empty string will be returned.
  582.  
  583. format:        formato = ZXAMActFormat()
  584.  
  585. -------------------------------------------------------------------------------
  586.  
  587. ZXAMActSaveFormat:  Returns the format actually  selected for SAVE.  The result
  588. can be PC, MIRAGE, PC_PP and MIRAGE_PP.
  589.  
  590. format:        format = ZXAMActSaveFormat()
  591.  
  592. -------------------------------------------------------------------------------
  593.  
  594. ZXAMProgVersion: Returns the internal version of the emulator (version 1.5 will
  595. return  '39.16').  This is for scripts that uses functions available only since
  596. certain  version  (if  you  want  to  know the version at which appears certain
  597. function, look at the HISTORY at the end of this DOC.
  598.  
  599. format:        version = ZXAMProgVersion()
  600.  
  601. -------------------------------------------------------------------------------
  602.  
  603. ZXAMSaveFormat:  Selects a  format for  SAVE.  Can  be  PC,  MIRAGE,  PC_PP  or
  604. MIRAGE_PP.
  605.  
  606. format:        ZXAMSaveFormat( formatname )
  607.  
  608. -------------------------------------------------------------------------------
  609.  
  610. ZXAMParseLoaded:  Tries  to load in memory the block passed as string of bytes.
  611. If  the  format is known (PC, MIRAGE, Z80 or KGB, without compression) then the
  612. memory  and  registers  will be loaded with the passed block. The function will
  613. return  the  name of the format of the block. If the format is unknown then the
  614. function will return an empty string, and nothing is modified.
  615.  
  616. format:        format = ZXAMParseLoaded( block )
  617.  
  618. -------------------------------------------------------------------------------
  619.  
  620. ZXAMParseToSave: Returns the contents of the memory and registers in the format
  621. selected for SAVE (without compression).
  622.  
  623. format:        block = ZXAMParseToSave()
  624.  
  625. -------------------------------------------------------------------------------
  626.  
  627. ZXAMJoinPathName: Joins the path and the name.
  628.  
  629. format:        path_&_name = ZXAMJoinPathName( path , name )
  630.  
  631. -------------------------------------------------------------------------------
  632.  
  633. ZXAMGetScr:  Returns  the actual  Spectrum screen  in  interleaved  format,  4
  634. bitplanes, ready to be saved inside a IFF ILBM file.
  635.  
  636. format:        block = ZXAMGetScr()
  637.  
  638. -------------------------------------------------------------------------------
  639.  
  640. ZXAMClearNameFormat: Deletes the 'Loaded file' and 'Format' boxes.
  641.  
  642. format:        ZXAMClearNameFormat()
  643.  
  644. -------------------------------------------------------------------------------
  645.  
  646. ZXAMLoadPath: Modifies the path of the LOAD requester.
  647.  
  648. format:        ZXAMLoadPath( path )
  649.  
  650. -------------------------------------------------------------------------------
  651.  
  652. ZXAMSavePath: Modifies the path of the SAVE requester.
  653.  
  654. format:        ZXAMSavePath( path )
  655.  
  656. -------------------------------------------------------------------------------
  657.  
  658. ZXAMFilePart: Returns only the filename from a full path.
  659.  
  660. format:        name = ZXAMFilePart( path_&_name )
  661.  
  662. -------------------------------------------------------------------------------
  663.  
  664. ZXAMPathPart: Returns only the path from a full path.
  665.  
  666. format:        path = ZXAMPathPart( path_&_name )
  667.  
  668. -------------------------------------------------------------------------------
  669.  
  670. ZXAMPreRun: Modifies the PRERUN command line.
  671.  
  672. format:        ZXAMPreRun( command_line )
  673.  
  674. -------------------------------------------------------------------------------
  675.  
  676. ZXAMActPreRun: Returns the actual PRERUN command line.
  677.  
  678. format:        command_line = ZXAMActPreRun()
  679.  
  680. -------------------------------------------------------------------------------
  681.  
  682. ZXAMPostRun: Modifies the POSTRUN command line.
  683.  
  684. format:        ZXAMPostRun( command_line )
  685.  
  686. -------------------------------------------------------------------------------
  687.  
  688. ZXAMActPostRun: Returns the actual POSTRUN command line.
  689.  
  690. format:        command_line = ZXAMActPostRun()
  691.  
  692. -------------------------------------------------------------------------------
  693.  
  694. ZXAMPattern: Modifies the pattern for the file requesters.
  695.  
  696. format:        ZXAMPattern( pattern )
  697.  
  698. -------------------------------------------------------------------------------
  699.  
  700. ZXAMActPattern: Returns the actual pattern for the file requesters.
  701.  
  702. format:        pattern = ZXAMActPattern()
  703.  
  704. -------------------------------------------------------------------------------
  705.  
  706. ZXAMBASICToken:  Returns  the expanded token string equivalent to the character
  707. supplied. For example, ZXAMBASICToken('ff'x) will return 'COPY'. All characters
  708. from 0 to 255 are translated according to the Spectrum's character table.
  709.  
  710. format:        string = ZXAMBASICToken( character )
  711.  
  712. -------------------------------------------------------------------------------
  713.  
  714. ZXAMReadAbort:  Returns  0 or 1, depending if the 'Abort ARexx' gadget has been
  715. pressed.
  716.  
  717. format:        pressed = ZXAMReadAbort()
  718.  
  719. -------------------------------------------------------------------------------
  720.  
  721. ZXAMClearAbort: Clears the flag that is set when 'Abort ARexx' is pressed.
  722.  
  723. format:        ZXAMClearAbort()
  724.  
  725. -------------------------------------------------------------------------------
  726.  
  727. ZXAMNoReload:  Disables  the  'Reload' gadget. This must be done when you leave
  728. permanently changed the contents of the 'Loaded File' box.
  729.  
  730. format:        ZXAMNoReload()
  731.  
  732. -------------------------------------------------------------------------------
  733.  
  734. ZXAMEnableAbort:  Enables  the  'Abort  ARexx' gadget. This must be done if you
  735. want  to  read  it  (when  runnig  an  ARexx  script  the gadget is disabled by
  736. default).
  737.  
  738. format:        ZXAMEnableAbort()
  739.  
  740. -------------------------------------------------------------------------------
  741.  
  742. ZXAMDisableAbort:  Disables the 'Abort ARexx' gadget. If you don't want to read
  743. the gadget, you can disable it.
  744.  
  745. format:        ZXAMDisableAbort()
  746.  
  747. -------------------------------------------------------------------------------
  748.  
  749. ZXAMDisassemble: Disassembles the Z80 instruction placed in the given address
  750.                  and returns a string formatted the following way:
  751.                 - 1 ASCII character that says the number of bytes length of the
  752.                   instruction. This is useful to increment the memory pointer
  753.                   this number and thus point to the next instruction. This char
  754.                   must be excluded when printing the disassemble.
  755.                 - the rest of the string is the typical Z80 disassemble in the
  756.                   usual 'address+object code+mnemonic' format. If the
  757.                   instruction disassmebled is a relative jump (JR, DJNZ, etc)
  758.                   a comment will be appended to the line with the destination
  759.                   address of the jump. The illegal instructios will be
  760.                   presented as '---'.
  761.  
  762.                 The optional parameter "format" sets the format of the number
  763.                 printing of address and data. 'H' means hexadecimal and 'D'
  764.                 means decimal. The default is hexadecimal.
  765.  
  766. format:        ZXAMDisassemble( address , [format] )
  767.  
  768. -------------------------------------------------------------------------------
  769.  
  770. ZXAMLoadMode:  Sets  the mode for the LOAD patch (that means, sets the state of
  771. the LOAD MODE menu). The mode is a string ('TAPE' o 'DISK').
  772.  
  773. format:        ZXAMLoadMode( mode )
  774.  
  775. -------------------------------------------------------------------------------
  776.  
  777. ZXAMSaveMode:  Sets  the mode for the SAVE patch (that means, sets the state of
  778. the SAVE MODE menu). The mode is a string ('TAPE', 'DISK' or 'DISK_PP).
  779.  
  780. format:        ZXAMSaveMode( mode )
  781.  
  782. -------------------------------------------------------------------------------
  783.  
  784. ZXAMActLoadMode:  Returns  the  actual  mode of the LOAD patch (that means, the
  785. status of the LOAD MODE menu). The result is a string ('TAPE' or 'DISK').
  786.  
  787. format:        mode = ZXAMActLoadMode()
  788.  
  789. -------------------------------------------------------------------------------
  790.  
  791. ZXAMActSaveMode:  Returns  the  actual  mode of the SAVE patch (that means, the
  792. status  of  the  SAVE  MODE  menu).  The  result is a string ('TAPE', 'DISK' or
  793. 'DISK_PP').
  794.  
  795. format:        mode = ZXAMActSaveMode()
  796.  
  797. -------------------------------------------------------------------------------
  798.  
  799. ZXAMAbout: Shows the 'About...' requester.
  800.  
  801. format:        ZXAMAbout()
  802.  
  803. -------------------------------------------------------------------------------
  804.  
  805. ZXAMFindBlock: Search for a series of bytes in the Spectrum's memory. The first
  806. argument is the starting address for searching, and the second is the bytes for
  807. search   in   a   string.   That  means,  for  searching  'HELLO'  we  must  do
  808. ZXAMFindBlock(0,'HELLO'),  anf  for  searching  the  bytes  0F 45 7B we must do
  809. ZXAMFindBlock(0,'0F457B'x). If de hexadecimal string is in a variable, then you
  810. must  use  x2c(variable)  in the second argument. This way ARexx will translate
  811. the  hexadecimal  sctrind in the corresponding bytes. The result is the address
  812. where the bytes has been found, or -1 if they hasn't been found.
  813.  
  814. format:        address = ZXAMFindBlock( address , block_for_search )
  815.  
  816. -------------------------------------------------------------------------------
  817.  
  818. ZXAMDoChecksum:  Does a checksum like the one that does the ROM's SAVE routine,
  819. that means, does a XOR (exclusive OR) of all the bytes of a block of bytes. The
  820. parameters  are  the  starting  address  of the block and the length (number of
  821. bytes) of this block. The result is the XOR of all those bytes.
  822.  
  823. format:        result = ZXAMDoChecksum( address , number_of_bytes )
  824.  
  825. -------------------------------------------------------------------------------
  826.  
  827. ZXAMBreakPoint:  Puts  a  breakpoint  at  the  given  address of the Spectrum's
  828. memory.  If  while the execution of code the Z80 arrives to the breakpoint, the
  829. emulator returns to the WorkBench (like if the 'HELP' key has been pressed) and
  830. the  breakpoint  will  disappear.  Only  ONE  breakpoint  can be in memory. The
  831. execution  of  ZXAMBreakpoint()  deletes  the previous breakpoint. If the given
  832. address  is  0  then  the  previous  breakpoint  will  be  deleted,  and no new
  833. breakpoint  will  be  put. The breakpoint is an instruction. That means that if
  834. the  program  modifies  the memory address where the breakpoint is put, it will
  835. disappear.  The  breakpoint only survives to one entering into the emulator. As
  836. soon  as  you  press  'HELP'  to  exit  to  the  workbench, the breakpoint will
  837. disappear (the exit for load/save to disk doesn't delete the breakpoint).
  838.  
  839. format:        ZXAMBreakPoint( address )
  840.  
  841. -------------------------------------------------------------------------------
  842.  
  843. ZXAMTrace: Executes  the  instruction addressed by the Program Counter (without
  844. disabling the system). At the return, the function returns the disassembling of
  845. the  executed  instruction  (in  the  same  format than ZXAMDisassemble()). The
  846. 'format'  parameter  sets  if the disassembling is decimal ('d') or hexadecimal
  847. ('h'). It's optional, and the default mode is hexadecimal. Neither the CIAs nor
  848. the audio channels need to be allocated to run step-by=step code.
  849.  
  850. format:        diassem = ZXAMTrace( [format] )
  851.  
  852. -------------------------------------------------------------------------------
  853.  
  854. ZXAMDoInt:  Does an interruption (like if the INT signal has arrived to the Z80
  855. processor),  that  means,  puts  PC  in the stack, and sets the PC to the value
  856. appropriate to the actual Interrupt Mode ($38 if IM1, and the vector pointed by
  857. I if IM2). If the interrupts are disabled the function does nothing.
  858.  
  859. format:        ZXAMDoInt()
  860.  
  861. -------------------------------------------------------------------------------
  862.  
  863. ZXAMBlockOfRegs:  Returns  a  block of 27 bytes that contains all the registers
  864. and internal status of the Z80 processor. The block's structure is:
  865.  
  866. Pos   Size   Contents
  867.  0    1    A
  868.  1    1    F
  869.  2    2    BC
  870.  4    2    DE
  871.  6    2    HL
  872.  8    1    A'
  873.  9    1    F'
  874. 10    2    BC'
  875. 12    2    DE'
  876. 14    2    HL'
  877. 16    2    IX
  878. 18    2    IY
  879. 20    2    SP
  880. 22    2    PC
  881. 24    1    Interrupt Status (0=disabled / 1=enabled)
  882. 25    1    Interrupción Mode (0, 1 or 2)
  883. 26    1    Border Colour (0 to 7)
  884.  
  885. The  2  bytes  registers  are in 68000 format, that means, the most significant
  886. byte  comes FIRST. This function is for passing the whole register set to other
  887. programs,  like  a disassembler/monitor, instead of having to get the registers
  888. one by one.
  889.  
  890. format:        block = ZXAMBlockOfRegs()
  891.  
  892. -------------------------------------------------------------------------------
  893.  
  894. REGISTERS: the registers for use with ZXAMGetReg and ZXAMSetReg are:
  895.     
  896.        -8  bit  registers:  write  his  name  (A,  d,  etc...).  Even the
  897.         indivisible  16 bit  registers  can  be  accessed by halves.  For
  898.         example, SPH and SPL are the two halves of SP.
  899.         
  900.        -16 bit regiters:  write  his  name,  like  HL  or  PC.  AF  isn't
  901.         implemented.
  902.        
  903.        -inverted 16 bit registers:  swapping the letters of the name of a
  904.         16 bit register you will  read/write on it but swapping the upper
  905.         and lower bytes.
  906.         
  907.        -special "registers":
  908.             INT : status of interrupts (0=OFF, 1=ON)
  909.             IM : interrupr mode (0, 1 or 2)
  910.             BOR : actual border colour (0 to 7)
  911.  
  912. in all the cases you can append a '2' to the register name for accessing to the
  913. alternative  set of registers  (hl' = hl2 and a' = a2).  The registers are case
  914. insensitive. All the registers can be read and written.
  915.  
  916.  
  917.  
  918.  
  919. ›[0;1mTECHNICAL INFO›[0m
  920.  
  921.    Program  written  in assembler from the first lines to the full 17750 actual
  922. lines  (151023 lines when expanding MACROs!!!). In my Amiga 1200 with hard disk
  923. and  68030/28MHz  the  Devpac  3.02 assembles the emulator in 51 secs (3 min 50
  924. secs  with  a bare A1200, and 4 min 53 secs for the last version assembled with
  925. my Amiga 500 Plus). Well, if programming is fun... BIG programming is BIG fun!
  926.  
  927.    This is my third program in assembler. I began to program it in my Amiga 500
  928. Plus  with 2 Meg of RAM and 3 floppy drives. As soon as I can I bought an Amiga
  929. 1200 and converted the emulator to AGA-only and 68020 code.
  930.  
  931.    I began the emulator to experiment  with the 68020 code.  At the beginning I
  932. was programming conditionally in 68000 and 68020 code, and testing the emulator
  933. in the Amiga 4000/030 of a friend.  With the new Amiga 1200 I have experimented
  934. with the AGA chips, and discarded totally the 68000 code.
  935.  
  936.  
  937.  
  938.  
  939. ›[0;1mPRE-HISTORY (jurassic?, NO! Around summer 1993!›[0m)
  940.  
  941.    The     first     black&white/CLI-only  version,   with    ManicMiner  inside  the
  942. executable, worked in 10 days (phew!).  Since then there are 6 different colour
  943. emulation systems,  and 4 major restructurations of the Z80 emulation.    None of
  944. the pre-AGA versions has been released to the public.
  945.  
  946.    This  is not a  full time  project.    While  developing  the emulator  I  was
  947. studying  a little  automations course,  developing  the MPMaster  program  and
  948. practising my laziness.
  949.  
  950.  
  951.  
  952.  
  953. ›[0;1mHISTORY›[0m
  954.  
  955.       Version  Internal
  956.            version
  957.  
  958.     1.0 ß    39.00      (11-March-94)
  959.         -First public release.
  960.  
  961.         (distributed as ZXAM Spectrum Emulator AGA 1.0 ß)
  962.  
  963.     1.1 ß    39.01      (2-April-94) (renamed ZXAM_SureCrash)
  964.         -Audio filter off when emulating. Restored at exit.
  965.         -Disabled nearly all of the interruptions. The sound is
  966.          now a lot better.
  967.         -The system keyboard handler 'freezes' after a while.
  968.          I have to use this handler because of the new keyboard
  969.          hardware of the Amiga 1200 (snort!).
  970.  
  971.         39.02      (19-April-94)
  972.         -Added the ZOOM gadget to the window.
  973.         -The #%$&! system keyboard handler is still 'freezing'.
  974.  
  975.         (never distributed)
  976.  
  977.     1.2 ß    39.03      (26-January-94)
  978.         -¡At last! Fixed the problem with the system keyboard handler.
  979.         -Now, if you press the Caps Lock key the system will be
  980.          informed correctly about its state.
  981.         -Available the FULL (complete) and FAST (faster) versions.
  982.          The FAST version is about 10% faster, but it is a less
  983.          detailed emulation (no BCD, no R register, etc...).
  984.  
  985.         39.04      (27-January-94)
  986.         -The emulator 'detachs' from the SHELL window.
  987.         -The icon ToolTypes will be read even if the emulator runs
  988.          from the SHELL.
  989.  
  990.         39.05      (29-January-94)
  991.         -No more audio problems. If a player (like Delitracker) is
  992.          playing when starting the emulation, it will be stopped
  993.          until return to the WorkBench (at least, with the players
  994.          that I have).
  995.         
  996.         39.06
  997.         -The Timer-B of CIA-B is allocated.
  998.         -Preparatory version with some synchronizations with CIA Timer
  999.          for future implementations of LOAD/SAVE to tape.
  1000.         
  1001.         (distributed as ZXAM Spectrum Emulator AGA 1.2 ß)
  1002.  
  1003.     1.3 ß    39.07        (7-July-94)
  1004.         -First attempt of patching the ROM LOAD routine. Now you can
  1005.          LOAD from tape even in colour mode, with an Amiga 1200 with
  1006.          no FAST memory, and even with the FLASH working during the
  1007.          LOAD (!!). The patch seems to be very good, and works
  1008.          perfectly over the Amiga 1200 and Amiga 4000/030, but needs
  1009.          testing in other configurations.
  1010.         -Synchronized the OUT instruction. With this we have REAL
  1011.          TIME SAVE (not patched!!), and a pure tone BEEP. Some games
  1012.          now sounds A LOT better, but other have slowed down a little.
  1013.          
  1014.         39.08        (11-July-94)
  1015.         -REAL border! Now, if there is enough speed, you can see the
  1016.          fancy border effects that some programs do.
  1017.         -Readjusted the proportion of bright added to the colours when
  1018.          BRIGHT 1. Now looks much more like the original Spectrum.
  1019.         -Readjusted the LOAD patch. Still loads very well, but now
  1020.          reacts better to the BREAK, HELP ans ESC keys.
  1021.         -¡At last! I have managed to do that the lines counter of
  1022.          Devpac 3.02 "turns around" for the second time. Now the
  1023.          assembled lines (with the macros expanded) are 133637 (!!).
  1024.         
  1025.         39.09        (16-July-94)
  1026.         -Fixed the problem of the LOAD patch and OUT instruction with
  1027.          the border. Now the border is nearly perfect. Some border
  1028.          changes are missed because of interferences between the CPU
  1029.          and the copperlist. To see the border lines while LOADing or
  1030.          SAVEing is more than enough.
  1031.  
  1032.         (distributed as ZXAM Spectrum Emulator AGA 1.3 ß)
  1033.  
  1034.     1.3b ß    39.10        (23-July-94)
  1035.         -The emulator now includes a "transfer", that can pass
  1036.          Spectrum programs from disk to tape. Initially included
  1037.          for my personal use for the speed comparisions between
  1038.          my Amiga 1200 and my old Spectrum +2A.
  1039.         -When the program is saved to tape, it will be saved with
  1040.          the name used to load it from disk.
  1041.         -The transfer don't uses his own LOAD routine. It uses the
  1042.          ROM load routine. That means that even the emulator itself
  1043.          can load "tranferred" programs.
  1044.         -The transfer can be stopped with the HELP key.
  1045.         -The transfer saves even de border colour.
  1046.         -When you do "Save Program" the new name is passed to the
  1047.          "Loaded file" box. This way we can do "Reload" of the last
  1048.          saved program.
  1049.         -The SAVE requester stores a different path that the Load
  1050.          requester. This way is easier to do multiple format
  1051.          conversions.
  1052.         -If no program is loaded, the transfer saves the program with
  1053.          the name LOADER.
  1054.  
  1055.         39.11        (31-July-94)
  1056.         -Some adjustements done on the emulator synchronization. The
  1057.          sound is still stabilized, but some programs (like Manic
  1058.          Miner) have speeded up a little.
  1059.         -Fixed a bug with the transfer.
  1060.         -Fixed the problem of Kempston joystick with Panama Joe and
  1061.          Commando.
  1062.         -The border changes are now even faster.
  1063.                 
  1064.         (distributed as ZXAM Spectrum Emulator AGA 1.3b ß)
  1065.  
  1066.     1.4 ß    39.12        (2-September-94)
  1067.         -Fist attempt to add an ARexx port to the emulator. It works
  1068.          very well. Impemented functions GetReg, SetReg, Peek, Poke
  1069.          and Putmem.
  1070.         
  1071.          39.13        (10-September-94)
  1072.         -Now the menus are NewLook.
  1073.         -Added several ARexx functions. Implemented functions DPeek,
  1074.          DPoke, FindByte, and the reversed access to registers.
  1075.         -Added code to run ARexx scripts, but there isn't gadget for
  1076.          that thing yet.
  1077.         -Written some scripts.
  1078.  
  1079.          39.14        (16-September-94)
  1080.          -Added internal version to About...
  1081.          -Added the ROMFILE ToolType, to load external ROMs. The ROM
  1082.           can be compressed with powerpacker.
  1083.          -The name of the last loaded/saved program now appears in
  1084.           the SAVE filerequester, but with the extension of the actually
  1085.           seleted SAVE format.
  1086.          -Added more ARexx functions: ProgVersion, ActSaveFormat,
  1087.          SaveFormat, ParseToSave, ParseLoaded, JoinPathName,
  1088.          ClearNameFormat, GetScr, FilePart, PathPart, LoadPath
  1089.          and SavePath.
  1090.          -Modified the scripts to use the "powerpacked" functions.
  1091.         -Added the 'Run ARexx' gadget. The gadget opens a filerequester
  1092.          to select the script you want to run.
  1093.         -Added ToolType REXXPATH to specify the path where open the
  1094.          'Run ARexx' filerequester. Extension is always '.zxam.
  1095.         -When you run it from the CLI, it will do CD to de path where
  1096.          the executable is placed. Every path must be relative to the
  1097.          executable's directory, or must supply a full path.
  1098.          
  1099.         (never distributed)
  1100.         
  1101.     1.5    39.15        (28-September-94)
  1102.         -Added the option to save the programs compressed with
  1103.          powerpacker.library.
  1104.         -Reused the 'Save format' buttons. Now there are 2 buttons
  1105.          for each format (raw and compressed).
  1106.         -Added my FidoNet address to the About ;-)
  1107.         -Added more ARexx functions: ProgVersion, ActSaveFormat,
  1108.          SaveFormat, ParseToSave, ParseLoaded, JoinPathName,
  1109.          ClearNameFormat, GetScr, FilePart, PathPart, LoadPath
  1110.          SavePath, PreRun, ActPreRun, PostRun, ActPostRun,
  1111.          Pattern, ActPattern and BASICToken.
  1112.         -If the ARexx port can't be created succesfully the
  1113.          'Run ARexx' gadget is disabled.
  1114.         -Added the option to add a title to the LOAD and SAVE
  1115.          filerequesters when used from ARexx.
  1116.         -Now the emulator returns properly the memory when there
  1117.          is no WB 3.0+, 68020+ or AGA chipset.
  1118.         -The window is an AppWindow. That means that you can drop
  1119.          icons inside the window and it will be loaded. If you
  1120.          drop a disk/drawer the filerequester will be opened in
  1121.          that disk/drawer.
  1122.         -Added ToolTypes PRERUN y POSTRUN for running of commands
  1123.          right before the emulation is started, and before the
  1124.          emulation is stopped.
  1125.         -Before PRERUN the caches status is stored, and is restored
  1126.          before POSTRUN.
  1127.         -The emulator is no longer ß (BETA). That means that the
  1128.          interface is complete and the emulator is stable. The
  1129.          precision of emulation isn't included in the ß
  1130.          consideration, because if it where included the emulator
  1131.          could remain ß forever!! This is NOT a resignation
  1132.          to improve the emulation ;-)
  1133.  
  1134.         39.16        (12-October-94)
  1135.         -Added ARexx functions: ClearAbort, ReadAbort and NoReload.
  1136.         -Added the 'Abort ARexx' gadget, to stop the ARexx scripts.
  1137.          Anyway, the script is the one that must read the gadget
  1138.          and decide the appropriate action.
  1139.         
  1140.         39.17        (27-October-94)
  1141.         -Modified some instructions that uses de P/V flag.
  1142.         -Created an OCS/ECS version of the emulator. This
  1143.          version don't have FLASH attributes (instead they are
  1144.          inverted) and the colour emulation is slower than the
  1145.          AGA version. These are the only differences between
  1146.          the OCS/ECS version and the AGA version.
  1147.  
  1148.         (distributed as ZXAM Spectrum Emulator 1.5)
  1149.  
  1150.     1.6    39.18        (14-November-94)
  1151.         -Now the emulator allocates correctly the audio channel 0. If
  1152.                  the channel isn't available, a requester is showed and the
  1153.                  emulation will not run.
  1154.  
  1155.         39.19        (6-December-94)
  1156.         -Added the ZXAMDisassemble ARexx function, that disassembles
  1157.                  Z80 code from the spectrum's memory.
  1158.         -Fixed a problem with keyboard and some games (like the
  1159.                  DINAMIC ones).
  1160.         -Added a menu to enable/disable the audio-CIA sync.
  1161.         -Added the CIASYNC tooltype.
  1162.         -Added a menu to select the mode of the ROM's SAVE routine.
  1163.                  Can be redirected to TAPE, DISK or DISK crunching the data
  1164.                  with powerpacker.library. Pressing CANCEL a BREAK will be
  1165.                  performed inside the emulator.
  1166.         -Added a menu to select the mode of the ROM's LOAD routine,
  1167.                  that can be redirected to TAPE or DISK.
  1168.         -The CIA reading is better.
  1169.         -Now the emulator can use any CIA available. Before the
  1170.                  emulator needed specifically the TIMER-B of CIA-B.
  1171.         -The CIA timer is allocated only during the emulation.
  1172.         -Fixed a problem of the FLASH with processors with data
  1173.                  cache (030 and 040).
  1174.         -Added support for loading the Z80 snapshots.
  1175.  
  1176.         39.20        (22-December-94)
  1177.         -Fixed a problem with Arexx scripts and paths with spaces.
  1178.         -Added the LOADMODE and SAVEMODE tooltypes.
  1179.         -Fixed a problem with the filename extension when doing
  1180.                  'save program'.
  1181.         -The games can be loaded by their 'default tool' o doing
  1182.                  multi-selection.
  1183.         -Added to the Disassemble function the possibility of printing
  1184.                  addresses/data in decimal or hexadecimal.
  1185.                 -Added to Disassemble the printing of destination address of
  1186.                  relative jumps.
  1187.         -Now the transfer is no more affected by the Save Mode menu,
  1188.                  and always does the SAVE to tape.
  1189.         -Added support for loading NEW Z80 format (2.01). Older
  1190.                  versions only can load the OLD Z80 format (1.45).
  1191.         -Modified the ZXAMParseLoaded() ARexx function to load and
  1192.                  parse Z80 snapshots.
  1193.                 -Removed the menu that enabled to enable/disable the audio
  1194.                  sync with CIA. Removed the CIASYNC ToolType too.
  1195.         -Fixed a minor bug when saving in PC_PP format.
  1196.         -The emulator now allocates the 4 audio channels, for a
  1197.                  forthcoming AY-3-8912 emulation.
  1198.         -The emulator is now crunched with Imploder 4.0. Before it
  1199.                  was crunched with powerpacker, but the decrunching header
  1200.                  caused some gurus in low memory conditions.
  1201.  
  1202.                 (distributed as ZXAM Spectrum Emulator 1.6)
  1203.  
  1204.     1.6b    39.21        (19-January-94)
  1205.         -Fixed a bug in the loading of Z80 snapshots. The emulator
  1206.                  refused to load old (v1.45) Z80 snapshots if they where
  1207.                  compressed. This bug was due to wrong information in
  1208.                  the "Z80" v1.45 manual :-(
  1209.                 -Added the possibility of loading (but not saving)
  1210.                  snapshots in KGB format.
  1211.                 -Modified some instructions. Now these instructions
  1212.                  increments correctly the R register.
  1213.                 -Some enhancements in the flags emulation.
  1214.                 -Added an ARexx script for disassembling, BASIC listing
  1215.                  searching of pokes, etc... It's a kind of monitor
  1216.                  (Made by Leo Cocaña. Thanks Leo! :-)
  1217.                 -Fixed two bugs in the embedded disassembler (in the
  1218.                  'ld hl,(nn)' and 'ld (nn),de' instructions).
  1219.                 -Added the ARexx functions  LoadMode(), SaveMode(),
  1220.                  ActLoadMode() y ActSaveMode(). This way the new
  1221.                  menu 'options' can be controlled from ARexx too.
  1222.                 -Added the ARexx function About()
  1223.                 -Modified the ARexx function ParseLoaded() for parse
  1224.                  the KGB snapshots too.
  1225.                 -Now 'Reload' works after a 'Save program'.
  1226.                 -After 'Reset & Run' the 'Reload' shortcut is disabled
  1227.                  (like the gadget).
  1228.                 -Embedded a 1 second pause at the end of the ROM's SAVE
  1229.                  routine. This is for programs that SAVE headers and blocks
  1230.                  without pause between them (like the GENS assembler).
  1231.         -Added ARexx functions FindBlock() and DoChecksum().
  1232.                 -Added ARexx functions BreakPoint(), Trace(), DoInt() and
  1233.                  BlockOfRegs(). With these functions you can execute Z80
  1234.                  code step-by-step, and put breakpoints.
  1235.                 -Modified the ARexx function GetReg(). Now it has a second
  1236.                  parameter (optional) that sets the format of the result
  1237.                  (decimal or hexadecimal).
  1238.         -Now, when an ARexx script is running, the 'close window'
  1239.                  events aren't queued anymore, and the menues are disabled.
  1240.                 -Fixed a bug in the 'Reload' routine after doing SAVE in
  1241.                  PC_PP format.
  1242.  
  1243.                 (distributed as ZXAM Spectrum Emulator 1.6b)
  1244.  
  1245.  
  1246.  
  1247.  
  1248. ›[0;1mFUTURE (near future?... or FAR future?)›[0m
  1249.  
  1250. When finished there will be two versions:
  1251.  
  1252.    - FAST version: with external tape loader (like the Spectrum Emulator 1.7).
  1253.      Some things, like BCD, R register, etc... aren't emulated.
  1254.  
  1255.    - FULL version: with REAL TIME LOADING (like the real Spectrum). It will
  1256.      load anything, even the protected programs. It will run over Amiga
  1257.      4000, and maybe over Amiga 1200 with FAST 32 bits. The emulation will
  1258.      be almost complete. Anyway, in this version the patch will be optional.
  1259.  
  1260.    As soon as I can  get some true FAST memory    for my Amiga 1200 I will  begin
  1261. to work seriously in the Real Time Loading.  Without FAST memory the Amiga 1200
  1262. can't run fast enough for real time loading.
  1263.  
  1264.    Anyway,  I am developing a shared  library  that will  make any tape-loading
  1265. routine  useless.  This  is the 'clairvoyance.library',  that will  foresee the
  1266. contents of any  tape without even having to connect the cassette-player to the
  1267. computer.  In the  future  there  will be  a floppy disk version,  and maybe  a
  1268. network version.
  1269.  
  1270.  
  1271.  
  1272.  
  1273. ›[0;1mACKNOWLEDGMENTS›[0m
  1274.  
  1275.    I wish to thank to:
  1276.  
  1277.    - Fco Javier Cocaña Galán, Leonardo Cocaña Galán and Juan A. Estela Valín
  1278.      for their friendship and suggestions.
  1279.    - Commodore-Amiga Inc for create the very best computer in the world.
  1280.    - Motorola for their powerful and flexible microprocessors.
  1281.    - Nico François for create the reqtools.library and powerpacker.library.
  1282.    - Jan van den Baard for the incredibly useful GadToolsBox.
  1283.    - IBM and Atari for create so bad computers, making very easy my choosing
  1284.      for the Amiga.
  1285.    - Miguel Barnosi, Sysop of TANIT-BBS, for sending the emulator to several
  1286.      BBS of Spain  and for acting as a "bridge" between me and FidoNET,  and
  1287.      for initiating me to the world of comms.
  1288.    - Alberto Ordoñez Tellez,  Raúl Ureña Sánchez, Arturo Rubio Pavón, Javier
  1289.      López Cosialls  and Sergi Martinez Colldeforn  for encourage me and for
  1290.      their suggestions.
  1291.    - Andrew Pointon (England) for sending to  me some .Z80 snapshot (without
  1292.      it I couldn't manage  to implement the Z80 format) and some .TAP files.
  1293.    - Flávio Massao Matsumoto  (Brazil) for  sending to  me the  "ZX Spectrum
  1294.      FAQ" of Internet.  Without it  I couln't  manage  to implement  the KGB
  1295.      snapshot format.
  1296.    - Jordy Mejias  for passing  to me the  KBG disk,  that  I deleted a long
  1297.      time ago.
  1298.  
  1299.  
  1300.  
  1301.  
  1302. ›[0;1mCONTACTS›[0m
  1303.  
  1304.    If you have    any information about file formats, please, send it to me along
  1305. with a    disk with some    programs saved    in that format.  If  you find  some bug
  1306. (NAH!)    report    me the    conditions in that  it was  found  (processor,    memory,
  1307. etc..). If the problem is with a Spectrum program, send it to me.
  1308.  
  1309.    I would like  if you can send me a letter about the speed of the emulator in
  1310. your computer. I have tested the emulator in an Amiga 4000/030 with FAST memory
  1311. (runs a  bit faster that the real Spectrum)  and in my    Amiga 1200 without FAST
  1312. (sob!).  To report  me the  speed you  can measure  the  time  taken  for  some
  1313. operation  that I can reproduce  in my 1200 and  Spectrum +2A, like a RESET,  a
  1314. BASIC loop  (please,  send me the listing of the loop),  or any other thing.  I
  1315. am very interested  in the  speed over  an Amiga 1200 with  FAST 32 bits and an
  1316. Amiga 4000/040.  Try to run the program _SpeedTest_.SP that  is along  with the
  1317. emulator.
  1318.  
  1319.    For sending suggestions, bugs, information interchange, etc., contact me  at
  1320. the following address:
  1321.  
  1322.              Antonio J. Pomar Rosselló
  1323.                C/ Alférez Cerdá  nº 13-bajos
  1324.               Palma de Mallorca 07014
  1325.                  Baleares (Spain)
  1326.  
  1327.  
  1328. You can send me e-mail trough FidoNet: Toni Pomar (2:343/119.80).
  1329.  
  1330. or AmigaNet: Toni Pomar (39:190/1.80).
  1331.  
  1332. or InterNet: tpomar@penedes.mazanet.encomix.com
  1333.  
  1334. Palma de Mallorca 14-January-1994
  1335.  
  1336. NOTE:  my knowledge of    English is  VERY limited,  and    this  text  is    a  good
  1337. sample    of  this  fact.
  1338.  
  1339. IF (you=spanish) OR (you KNOW spanish) THEN
  1340.   GOTO ZXAM_SpectrumAGA.DOCesp : REM The spanish DOC in much more detailed!
  1341. ELSE
  1342.   READ ZXAM_SpectrumAGA.DOCeng : REM Sorry. I hope that you don't get headache!
  1343. ENDIF
  1344.  
  1345. NOTE2:    if you know about  a Dragon 32    emulator for  the Amiga,  please let me
  1346. know.  I know a friend    of mine that  wants that I program such  an emulator. I
  1347. think that some times there is a justification for murder...(AARGH!!).
  1348.  
  1349.  
  1350. ›[0m›[1 p